﻿// License Notification
//======================================================
// Copyright (c) 2010 Channel Intelligence Inc.
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// which accompanies this distribution, and is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// ======================================================





namespace CIP4.DataProvider.MassTransit
{
    public class WindsorMaker
    {
        public static string GetWindsorXml(string busId, string role)
        {
            const string xmlText = @"
                <configuration>

                  <facilities>

                    <facility id=""masstransit"">

                      <bus id=""{0}"" endpoint=""msmq://localhost/mt_{0}_{1}"">
                        <subscriptionService endpoint=""msmq://localhost/mt_subscriptions"" />
                        <managementService heartbeatInterval=""3"" />
                      </bus>

                      <transports>
                        <transport>MassTransit.Transports.Msmq.MsmqEndpoint, MassTransit.Transports.Msmq</transport>
                      </transports>
                    </facility>

                  </facilities>

                </configuration>";
            return string.Format(xmlText, busId, role);
        }

    }
}
